package com.piggy.logi.sys.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.piggy.common.core.web.page.BaseMapperPlus;
import com.piggy.logi.sys.domain.LogiWaybill;
import com.piggy.logi.sys.vo.LogiWaybillExtVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 运单信息Mapper接口
 */
public interface LogiWaybillMapper extends BaseMapperPlus<LogiWaybill> {

    default List<LogiWaybill> selectByLoadId(Long loadId) {
        return selectList(Wrappers.<LogiWaybill>lambdaQuery().eq(LogiWaybill::getLoadId, loadId));
    }

    default List<LogiWaybill> selectByScheduleNo(String scheduleNo) {
        return selectList(Wrappers.<LogiWaybill>lambdaQuery().eq(LogiWaybill::getScheduleNo, scheduleNo));
    }

    List<LogiWaybillExtVo> selectWaybillList(@Param("ew") Wrapper<LogiWaybill> ew);
}
